How to convert a Java Long to byte[] for Cassandra?

Posted by dfrankow on Stack Overflow See other posts from Stack Overflow or by dfrankow
Published on 2010-04-14T21:23:24Z Indexed on 2010/04/14 21:33 UTC
Read the original article Hit count: 221

Filed under:
|
|

Lazy programmer alert. :)

Cassandra stores column values as bytes (Java example). Specifying a LongType comparator compares those bytes as a long. I want the value of a long into a Cassandra-friendly byte[]. How? I poked around for awhile. I think you people can help me faster.

© Stack Overflow or respective owner

Related posts about cassandra

Related posts about java